package senpec.qc.harmony.person.certification;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.Entity;
import lombok.*;
import senpec.qc.harmony.base.mybatisplus.IBaseEntity;
import tools.jackson.databind.annotation.JsonDeserialize;
import tools.jackson.databind.annotation.JsonSerialize;
import tools.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import tools.jackson.datatype.jsr310.ser.LocalDateSerializer;

import java.time.LocalDate;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor(force = true)
@AllArgsConstructor
@Entity(name = "harmony_person_certification")
@TableName("harmony_person_certification")
public class Certification extends IBaseEntity<Certification> {
    private Long userId;
    private String name;
    private String username;
    private String workNo;
    private String certificationReference;//证书编号
    private String industry;//行业
    private String method;//方法
    private String level;//等级
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;//开始日期
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;//结束日期

}
